﻿using Domain.Entity;
using Domain.Entity.sys;
using Domain.IRepository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Application.InfoService
{
    public class InfoService : IInfoService
    {
        private readonly IInfoRepository infoRepository;

        public InfoService(IInfoRepository infoRepository)
        {
            this.infoRepository = infoRepository;
        }

        //删除
        public async Task<int> DeleteInfo(int id)
        {
            return await infoRepository.DeleteInfo(id);
        }

        //查询
        public async Task<FenYe<Info>> GetInfo(FenYe<Info> fenYe, string? text, string? type, int? status)
        {
            return await infoRepository.GetInfo(fenYe, text, type, status);
        }


        //修改信息状态
        public async Task<int> UpdateStatus(int id, int status)
        {
            return await infoRepository.UpdateStatus(id, status);
        }
    }
}
